<?php
html::printPath(array(
    'room.form-title' => '/admin/room/all',
    $room['name'] => '/admin/room/display?code=' . $room['code'],
    sql::isPersistent($formData) ? 'application.editThisL10n' : 'application.createNewL10n' => ''
));
$msg->printMessages();

if (sql::isPersistent($formData)) {
    echo '<ul class="commandList">';
    echo '<li class="deleteLi">' . html::anchor('admin/room/deleteLocalizedValues?room_code=' . $room['code'] . '&language_code=' . $formData['language_code'], text::get('application.deleteThisL10n'), array('onclick'=>'return confirmDeletion()')) . '</li>';
    echo '</ul>';
}

$fb = new FormBuilder('room', $formData);
$fb->setAction('/admin/room/saveLocalizedValues');
$fb->hidden('room_code');
$fb->comboBox('language_code', $languageOptions)->required()->readOnly(sql::isPersistent($formData));
$fb->text('name')->required();
$fb->textarea('description')->required();
$fb->submitButton();
$fb->write();
